<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>短时交通流预测平台V1.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../libs/layui/css/layui.css" media="all">
    <style>
        /* 顶部导航样式 */
        .layui-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            background-color: #393D49;
            height: 60px;
            line-height: 60px;
        }
        
        .layui-header .layui-logo {
            color: #fff;
            font-size: 18px;
            font-weight: bold;
            padding-left: 20px;
        }
        
        /* 左侧导航样式 */
        .layui-side {
            position: fixed;
            top: 60px;
            left: 0;
            bottom: 0;
            z-index: 999;
            width: 200px;
            background-color: #2F4056;
        }
        
        /* 主内容区域样式 */
        .layui-body {
            position: fixed;
            top: 60px;
            left: 200px;
            right: 0;
            bottom: 0;
            z-index: 998;
            background-color: #f2f2f2;
        }
        
        /* iframe样式 */
        .main-iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
        
        /* 导航菜单激活状态 */
        .layui-nav-itemed > a,
        .layui-nav-item.layui-this > a {
            background-color: #009688 !important;
        }
        
        /* 响应式处理 */
        @media screen and (max-width: 768px) {
            .layui-side {
                width: 160px;
            }
            .layui-body {
                left: 160px;
            }
        }
    </style>
</head>
<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <!-- 顶部导航 -->
        <div class="layui-header">
            <div class="layui-logo">短时交通流预测平台V1.0</div>
        </div>
        
        <!-- 左侧导航 -->
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <ul class="layui-nav layui-nav-tree" lay-filter="nav">
                    <li class="layui-nav-item">
                        <a href="javascript:;" data-url="dashboard.html">
                            <i class="layui-icon layui-icon-chart"></i>
                            实时交通仪表盘
                        </a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;" data-url="prediction.html">
                            <i class="layui-icon layui-icon-chart"></i>
                            交通流预测分析
                        </a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;" data-url="signal_optimization.html">
                            <i class="layui-icon layui-icon-set"></i>
                            信号配时建议
                        </a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;" data-url="history.html">
                            <i class="layui-icon layui-icon-time"></i>
                            历史数据回顾
                        </a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;" data-url="settings.html">
                            <i class="layui-icon layui-icon-console"></i>
                            系统参数配置
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        
        <!-- 主内容区域 -->
        <div class="layui-body">
            <iframe id="mainFrame" class="main-iframe" src="dashboard.html"></iframe>
        </div>
    </div>

    <script src="../../libs/layui/layui.js"></script>
    <script>
        layui.use(['element', 'jquery'], function(){
            var element = layui.element;
            var $ = layui.$;
            
            // 导航菜单点击事件
            $('.layui-nav a').on('click', function(){
                var url = $(this).data('url');
                if(url) {
                    // 移除其他菜单项的激活状态
                    $('.layui-nav-item').removeClass('layui-this');
                    // 添加当前菜单项的激活状态
                    $(this).parent().addClass('layui-this');
                    // 切换iframe内容
                    $('#mainFrame').attr('src', url);
                }
            });
            
            // 默认激活第一个菜单项
            $('.layui-nav-item:first').addClass('layui-this');
        });
    </script>
</body>
</html>
